package cp3120.dao;

import cp3120.model.Purchase;
import cp3120.model.pricing.PricingStrategy;

import java.util.List;

/**
 * User: Rowan Spence
 * Date: 26/05/2009
 * Time: 8:58:03 PM
 */
public interface PurchaseDAO {
    /**
     * gets a purchase
     * @param purchaseID the ID of the purchase to be retrieved
     * @return the purchase
     */
    public Purchase getPurchase(int purchaseID);

    /**
     * gets all purchases made by a specified user
     * @param userID the ID of the user whos purchases are to be retrieved
     * @return  a list of purchases
     */
    public List<Purchase> getUserPurchases(int userID);

    /**
     * adds a purchase
     * @param purchase the purchase to be added
     * @return true if added
     */
    public boolean addPurchase(Purchase purchase);

    /**
     * gets a list of all pricing strategys
     * @return a list of pricing strategys
     */
    public List<PricingStrategy> getPricingStrategys();

    /**
     * adds a pricing stratedy
     * @param strategy the pricing strategy to be added
     * @return true if added
     */
    public boolean addPricingStrategy(PricingStrategy strategy);

    /**
     * removes a pricing strategy
     * @param strategy the pricing strategy to be removed
     * @return true if removed
     */
    public boolean removePricingStrategy(PricingStrategy strategy);

    /**
     * updates a pricing strategy
     * @param strategy the updated pricing strategy
     * @return true if updated
     */
    public boolean updatePricingStrategy(PricingStrategy strategy);
}
